package org.jcc.core.cs.abstraction;

public class LeapYear {
	
	public static void main(String[] args) {
		System.out.println(getDayCountOfFeb(1900));
		System.out.println(getDayCountOfYear(2000));
	}

	private static int getDayCountOfFeb(int year) {
		if (((year % 4 == 0) && (year % 100 != 0)) 
				|| (year % 400 == 0)) {
			return 29;
		} else {
			return 28;
		}
	}

	private static int getDayCountOfYear(int year) {
		if (((year % 4 == 0) && (year % 100 != 0)) 
				|| (year % 400 == 0)) {
			return 366;
		} else {
			return 365;
		}
	}

	
	
}
